package com.woniu40.petai_user.mapper;

import com.woniu40.petai_user.entity.Dynamic;
import com.woniu40.petai_user.entity.Report;
import com.woniu40.petai_user.vo.ReportVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ReportMapper {
    int deleteByPrimaryKey(Integer reportId);

    int insert(ReportVo record);

    Report selectByPrimaryKey(Integer reportId);

    List<Report> selectAll();

    int updateByPrimaryKey(Report record);
    @Select("select * from t_dynamic where dynamic_id=#{dynamicId}")
    Dynamic selectdynamictext(Integer dynamicId);

    @Select("select * from t_report where user_id=#{userId} and dynamic_id=#{dynamicId}")
    List<Report> selectDreport(@Param("userId") Integer userId, @Param("dynamicId") Integer dynamicId);
}